home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / castools.zip / FUNC10H.ASM < prev    next >
Assembly Source File  |  1990-01-05  |  1KB  |  45 lines

  1. Include multi.inc
  2. Include model.inc
  3.  
  4. ;==============================================================================
  5. ;
  6. ;   CAS function 10h -- Get Current Event Status
  7. ;
  8. ;   Format:
  9. ;               int CASGetCurrentEventStatus (CECS *buffer)
  10. ;   Input:
  11. ;               pointer to current event structure
  12. ;   Output:
  13. ;               Returns 0 if successful or negative error code,
  14. ;               fills current event structure.
  15. ;==============================================================================
  16.  
  17.                 .CODE
  18. CASGetCurrentEventStatus     PROC    arg1:PTR WORD
  19.  
  20.                 push    ds              ; save registers
  21.                 push    dx
  22.  
  23.                 mov     ax,MUX          ; load multiplex number
  24.                 mov     ah,al           ; move into ah
  25.                 mov     al,10h          ; CAS function 10
  26.         IF      @DataSize               ; large and medium models
  27.                 lds     dx,arg1         ; pointer to data block
  28.         ELSE
  29.                 mov     dx,arg1         ; small model
  30.         ENDIF
  31.                 int     2Fh
  32.  
  33.                 cmp     ax,0            ; call successful?
  34.                 jne     FINISH          ; unsuccessful, don't change ax
  35.                 mov     ax,bx           ; load event handle
  36. FINISH:
  37.                 pop     dx              ; restore registers
  38.                 pop     ds
  39.                 ret
  40. CASGetCurrentEventStatus     endp
  41.  
  42.                 END
  43.  
  44.  
  45.